public class ParserHandler extends Object implements IParserHandler
Constructor and Description |
---|
ParserHandler(File outputFile,
String configFilePath)
Cstr.
|
Modifier and Type | Method and Description |
---|---|
void |
characters(String content)
Called when the text content of an element is read.
|
void |
comment(String comment)
Called when the comment is reached in input document.
|
void |
endDocument()
Called when the whole input document is read.
|
void |
endElement(ElementEnd element,
ElementStart elementStart)
Called when an end element is reached in the input document.
|
void |
startElement(ElementStart element)
Called when a start element is reached in the input document.
|
private Convertor _conv
public ParserHandler(File outputFile, String configFilePath) throws FatalErrorException
outputFile
- output LaTeX fileconfigFilePath
- the absolute path of the XML config fileFatalErrorException
- fatal error (ie. output file can't be closed) occurspublic void startElement(ElementStart element)
commonElementStart()
for non-special elements and specials methods for the elements requiring
special care (ie. tableRowStart()
for <table>
)startElement
in interface IParserHandler
element
- start element reachedpublic void endElement(ElementEnd element, ElementStart elementStart)
commonElementEnd()
for non-special elements and specials methods for the elements requiring
special care (ie. tableRowEnd()
for </table>
)endElement
in interface IParserHandler
element
- end element reachedelementStart
- corresponding start elementpublic void characters(String content)
characters()
method
of the Convertor
class.characters
in interface IParserHandler
content
- ie. "foo" for the "<b>foo</b>"public void comment(String comment)
comment()
method
of the Convertor
class.comment
in interface IParserHandler
comment
- ie. "foo" for the "<!-->foo</-->"public void endDocument()
endDocument
in interface IParserHandler